package com.sigmatrix.h5.web.dealer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.sigmatrix.h5.service.DisDealerAcctService;
import com.sigmatrix.h5.web.BaseController;
import com.sigmatrix.h5.web.Result;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags="crm账号权限")
@RestController
@RequestMapping("/dealer/acct")
public class AcctRoleController extends BaseController{
	
	@Autowired
	private DisDealerAcctService disDealerAcctService;
	
	
	@ApiOperation("保存crm账号权限")
	@PostMapping("/save")
	public Result<Void> save(@RequestParam Integer dealerId,@RequestParam Integer acctId){
		disDealerAcctService.saveRoleInfo(dealerId,acctId);
		return ok(null);
	}
	
}
